Skip to content

Cassandra Actions - #1729

Open
gonzalotguerrero wants to merge 14 commits into
masterfrom
feature/cassandra-actions
Open

gonzalotguerrero wants to merge 14 commits into
masterfrom
feature/cassandra-actions

Conversation

@gonzalotguerrero

Copy link
Copy Markdown
Collaborator

No description provided.

Base automatically changed from feature/cassandra-dsl to master September 1, 2026 09:31
* enumerated, it is also what [isSupported] answers from, so that the two cannot disagree.
*/
private val GENE_BUILDERS: Map<String, (String) -> Gene> = mapOf(
"ascii" to { name -> StringGene(name) },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace these strings with constants

* column becomes "name type" optionally followed by a " PARTITION KEY" and/or " CLUSTERING" marker,
* and columns are joined with ", ".
*/
object CassandraTableSchemaParser {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused. What is the expected grammar for this parser?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi JP! Apologies for my super late response. The expected grammar here was the one used in the now modified extractRelevantInfo method from CassandraHandler (which used the now deleted describeTableSchema method. It was an attempt to mimic MongoHandler's method with the same name, but I now changed it so that actual DTOs are used for the table schemas.

* @return the columns described in [tableSchema], in the same order
* @throws IllegalArgumentException if any of the described columns is malformed
*/
fun parse(tableSchema: String): List<CassandraColumn> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who produces the tableSchema string? What is the expected grammar?

* Whether the duration is negative, ie the sign shared by the three amounts it is composed of.
* Explicitly defaulted to false, as [BooleanGene] defaults to true.
*/
val negative: BooleanGene = BooleanGene("negative", false)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be isNegative instead of simply negative, right?

- Add proper schema DTOs to use in insertionBuilder
- Change attribute name
- Replace strings with constants
}

public CassandraTableSchemaDto(String keyspaceName, String tableName, List<CassandraColumnDto> columns) {
this.keyspaceName = keyspaceName;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are any of these fields expected to be null? Add Objects.requireNonNull or explicitly state that values can be null

@jgaleotti
jgaleotti requested a review from arcuri82 September 16, 2026 18:44
@gonzalotguerrero
gonzalotguerrero added this pull request to stack #1768 September 16, 2026 19:47
@gonzalotguerrero
gonzalotguerrero removed this pull request from stack #1768 September 17, 2026 21:05
@gonzalotguerrero
gonzalotguerrero added this pull request to stack #1776 September 17, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants